package com.china.bike.dao.impl;

import com.china.bike.dao.BikeAccountDao;
import com.china.bike.entity.BikeAccount;
import com.china.bike.mapper.BikeAccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class BikeAccountDaoImpl implements BikeAccountDao {

    @Autowired
    private BikeAccountMapper bikeAccountMapper;

    @Override
    public BikeAccount getUserAccount(Long userId) {
        return bikeAccountMapper.getUserAccount(userId);
    }

    @Override
    public void recordUseBike(BikeAccount bikeAccount) {
        bikeAccountMapper.recordUseBike(bikeAccount);
    }

    @Override
    public void createBikeAccount(BikeAccount bikeAccount) {
        bikeAccountMapper.createBikeAccount(bikeAccount);
    }
}
